package com.wy.powerbuilder.service.impl.ld;

import com.wy.powerbuilder.entity.ld.Menu;
import com.wy.powerbuilder.entity.ld.Sys_role_menu;
import com.wy.powerbuilder.mapper.ld.MenuMapper;
import com.wy.powerbuilder.mapper.ld.Role_MenuMapper;
import com.wy.powerbuilder.service.ld.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MenuServiceimpl implements MenuService {
    @Autowired
    private MenuMapper menuMapper;
    @Autowired
    private Role_MenuMapper role_menuMapper;
    @Override
    public List<Menu> getMenus(int id) {
        return menuMapper.getMenus(id);
    }

    @Override
    public Integer addRole_menu(Sys_role_menu sys_role_menu) {
        return role_menuMapper.addRole_menu(sys_role_menu);
    }

    @Override
    public int delRole_menu(int rid) {
        return role_menuMapper.delRole_menu(rid);
    }

    @Override
    public List<Sys_role_menu> getRole_menus(int rid) {
        return role_menuMapper.getRole_menus(rid);
    }
}
